package org.linuxsogood.boot.aop;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

/**
 * @author honway.liu
 * @date 2017/8/28 下午9:31
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
@Aspect
@Component
public class CheckPermission {

    @Pointcut("@annotation(AdminOnly)")
    public void pointcutDemo() {
    }

    @Before("pointcutDemo()")
    public void beforeMethod() {
        System.out.println("execute spring aop test.................");
    }

    @After("pointcutDemo()")
    public void afterMethod() {

    }

}
